package com.zy.datareceiver.core.controller;

import com.zy.datareceiver.core.common.ServerResponse;
import com.zy.datareceiver.core.utils.DateUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/sys/test")
public class TestController {

    @GetMapping("/hello")
    public String hello(){
        return "Hello World";
    }

    @GetMapping("/info")
    public ServerResponse info(){
        return ServerResponse.success(DateUtil.format(new Date(),DateUtil.PATTERN_YYYY_MM_DD_HHMM));
    }
}
